package com.dmall.manager.controller;

import com.dmall.content.pojo.TbContent;
import com.dmall.content.service.ContentService;
import com.dmall.framework.result.DmallResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 内容管理controller
 * @author Chen 2017/10/22
 */
@Controller
@RequestMapping("/content")
public class ContentController {
    @Autowired
    private ContentService contentService;

    /**
     * 添加一个内容
     */
    @RequestMapping(method = RequestMethod.POST)
    @ResponseBody
    public DmallResult addContent(TbContent content){
       return contentService.addContent(content);
    }
}
